<!DOCTYPE html>
<!-- saved from url=(0048)https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1 -->
<html lang="en" class=" is-u2f-enabled"><head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    

    <link crossorigin="anonymous" href="过渡 · d3_d3 Wiki_files/frameworks-c07e6f4b02b556d1d85052fb3853caf84c80e6b23dcdb1ae1b00f051da1115a2.css" integrity="sha256-wH5vSwK1VtHYUFL7OFPK+EyA5rI9zbGuGwDwUdoRFaI=" media="all" rel="stylesheet">
    <link crossorigin="anonymous" href="过渡 · d3_d3 Wiki_files/github-09e1c38d593bf8fc6e4c4f1b526d0184e27c433d64963942c1e8c361589f8125.css" integrity="sha256-CeHDjVk7+PxuTE8bUm0BhOJ8Qz1kljlCwejDYVifgSU=" media="all" rel="stylesheet">
    
    
    
    

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Language" content="en">
    <meta name="viewport" content="width=device-width">
    
    <title>过渡 · d3/d3 Wiki</title>
    <link rel="search" type="application/opensearchdescription+xml" href="https://github.com/opensearch.xml" title="GitHub">
    <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
    <link rel="apple-touch-icon" href="https://github.com/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="57x57" href="https://github.com/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="https://github.com/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="https://github.com/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="https://github.com/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="https://github.com/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="https://github.com/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="https://github.com/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="https://github.com/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="https://github.com/apple-touch-icon-180x180.png">
    <meta property="fb:app_id" content="1401488693436528">

      <meta content="https://avatars1.githubusercontent.com/u/1562726?v=3&amp;s=400" name="twitter:image:src"><meta content="@github" name="twitter:site"><meta content="summary" name="twitter:card"><meta content="d3/d3" name="twitter:title"><meta content="d3 - Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:" name="twitter:description">
      <meta content="https://avatars1.githubusercontent.com/u/1562726?v=3&amp;s=400" property="og:image"><meta content="GitHub" property="og:site_name"><meta content="object" property="og:type"><meta content="d3/d3" property="og:title"><meta content="https://github.com/d3/d3" property="og:url"><meta content="d3 - Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:" property="og:description">
      <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
    <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
    <link rel="assets" href="https://assets-cdn.github.com/">
    <style type="text/css"></style><link rel="web-socket" href="wss://live.github.com/_sockets/VjI6MTQyMzUxMDM1OjdhMTE1ZDZlZTY4YzQyNDMwNWFhZjgwMjFhNTZmMjgxOWE5NDgzNWQ2YjUzYmFjZGUyNjQyMGNmOWNkMWZhYzQ=--66b741f3b14d320e154200b5c09b1e8576100b9e">
    <meta name="pjax-timeout" content="1000">
    <link rel="sudo-modal" href="https://github.com/sessions/sudo_modal">
    <meta name="request-id" content="E361:7555:11458E2:1C6276F:5884534D" data-pjax-transient="">

    <meta name="msapplication-TileImage" content="/windows-tile.png">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="selected-link" value="repo_wiki" data-pjax-transient="">

    <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
    <meta name="google-analytics" content="UA-3769691-2">

<meta content="collector.githubapp.com" name="octolytics-host"><meta content="github" name="octolytics-app-id"><meta content="E361:7555:11458E2:1C6276F:5884534D" name="octolytics-dimension-request_id"><meta content="18323475" name="octolytics-actor-id"><meta content="defenderhhhh" name="octolytics-actor-login"><meta content="70592ef2d225e449076dd88e6b12c145017fd92eccf81e729a16009ced6970cb" name="octolytics-actor-hash">
<meta content="/<user-name>/<repo-name>/wiki/show" data-pjax-transient="true" name="analytics-location">



  <meta class="js-ga-set" name="dimension1" content="Logged In">



        <meta name="hostname" content="github.com">
    <meta name="user-login" content="defenderhhhh">

        <meta name="expected-hostname" content="github.com">
      <meta name="js-proxy-site-detection-payload" content="OTRjZTFlOWNiZjk1NDAwZWFlYTczMDcxYTExMjUwZDMyN2YxZWNiOTJhYWEyZTFiZmM0MWZkY2Q4NDE1OTUzY3x7InJlbW90ZV9hZGRyZXNzIjoiMjIyLjE4MC4xNjAuMTU0IiwicmVxdWVzdF9pZCI6IkUzNjE6NzU1NToxMTQ1OEUyOjFDNjI3NkY6NTg4NDUzNEQiLCJ0aW1lc3RhbXAiOjE0ODUwNjcwODYsImhvc3QiOiJnaXRodWIuY29tIn0=">


      <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
      <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">

    <meta name="html-safe-nonce" content="7da07f67fa3bc09c6326a894464ac00a14a92cab">

    <meta http-equiv="x-pjax-version" content="94a9cc48ead92329faac49833ac14041">
    

      
  <meta name="description" content="d3 - Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:">
  <meta name="go-import" content="github.com/d3/d3 git https://github.com/d3/d3.git">

  <meta content="1562726" name="octolytics-dimension-user_id"><meta content="d3" name="octolytics-dimension-user_login"><meta content="943149" name="octolytics-dimension-repository_id"><meta content="d3/d3" name="octolytics-dimension-repository_nwo"><meta content="true" name="octolytics-dimension-repository_public"><meta content="false" name="octolytics-dimension-repository_is_fork"><meta content="943149" name="octolytics-dimension-repository_network_root_id"><meta content="d3/d3" name="octolytics-dimension-repository_network_root_nwo">
  <link href="https://github.com/d3/d3/commits/master.atom" rel="alternate" title="Recent Commits to d3:master" type="application/atom+xml">


  </head>


  <body class="logged-in  env-production windows vis-public">
    <div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
    <a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>

    
    
    



        <div class="header header-logged-in true" role="banner">
  <div class="container clearfix">

    <a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
  <svg aria-hidden="true" class="octicon octicon-mark-github" height="28" version="1.1" viewBox="0 0 16 16" width="28"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>


        <div class="header-search scoped-search site-scoped-search js-site-search" role="search">
  <!-- '"` --><!-- </textarea></xmp> --><form accept-charset="UTF-8" action="https://github.com/d3/d3/search" class="js-site-search-form" data-scoped-search-url="/d3/d3/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div>
    <label class="form-control header-search-wrapper js-chromeless-input-container">
      <div class="header-search-scope">This repository</div>
      <input type="text" class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable" data-hotkey="s" name="q" placeholder="Search" aria-label="Search this repository" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off">
    </label>
</form></div>


      <ul class="header-nav float-left" role="navigation">
        <li class="header-nav-item">
          <a href="https://github.com/pulls" aria-label="Pull requests you created" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:pulls context:user" data-hotkey="g p" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls">
            Pull requests
</a>        </li>
        <li class="header-nav-item">
          <a href="https://github.com/issues" aria-label="Issues you created" class="js-selected-navigation-item header-nav-link" data-ga-click="Header, click, Nav menu - item:issues context:user" data-hotkey="g i" data-selected-links="/issues /issues/assigned /issues/mentioned /issues">
            Issues
</a>        </li>
          <li class="header-nav-item">
            <a class="header-nav-link" href="https://gist.github.com/" data-ga-click="Header, go to gist, text:gist">Gist</a>
          </li>
      </ul>

    
<ul class="header-nav user-nav float-right" id="user-links">
  <li class="header-nav-item">
    

  </li>

  <li class="header-nav-item dropdown js-menu-container">
    <a class="header-nav-link tooltipped tooltipped-s js-menu-target" href="https://github.com/new" aria-label="Create new…" data-ga-click="Header, create new, icon:add">
      <svg aria-hidden="true" class="octicon octicon-plus float-left" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 9H7v5H5V9H0V7h5V2h2v5h5z"></path></svg>
      <span class="dropdown-caret"></span>
    </a>

    <div class="dropdown-menu-content js-menu-content">
      <ul class="dropdown-menu dropdown-menu-sw">
        
<a class="dropdown-item" href="https://github.com/new" data-ga-click="Header, create new repository">
  New repository
</a>

  <a class="dropdown-item" href="https://github.com/new/import" data-ga-click="Header, import a repository">
    Import repository
  </a>

<a class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, create new gist">
  New gist
</a>

  <a class="dropdown-item" href="https://github.com/organizations/new" data-ga-click="Header, create new organization">
    New organization
  </a>



  <div class="dropdown-divider"></div>
  <div class="dropdown-header">
    <span title="d3/d3">This repository</span>
  </div>
    <a class="dropdown-item" href="https://github.com/d3/d3/issues/new" data-ga-click="Header, create new issue">
      New issue
    </a>

      </ul>
    </div>
  </li>

  <li class="header-nav-item dropdown js-menu-container">
    <a class="header-nav-link name tooltipped tooltipped-sw js-menu-target" href="https://github.com/defenderhhhh" aria-label="View profile and more" data-ga-click="Header, show menu, icon:avatar">
      <img alt="@defenderhhhh" class="avatar" height="20" src="过渡 · d3_d3 Wiki_files/18323475" width="20">
      <span class="dropdown-caret"></span>
    </a>

    <div class="dropdown-menu-content js-menu-content">
      <div class="dropdown-menu dropdown-menu-sw">
        <div class="dropdown-header header-nav-current-user css-truncate">
          Signed in as <strong class="css-truncate-target">defenderhhhh</strong>
        </div>

        <div class="dropdown-divider"></div>

        <a class="dropdown-item" href="https://github.com/defenderhhhh" data-ga-click="Header, go to profile, text:your profile">
          Your profile
        </a>
        <a class="dropdown-item" href="https://github.com/defenderhhhh?tab=stars" data-ga-click="Header, go to starred repos, text:your stars">
          Your stars
        </a>
        <a class="dropdown-item" href="https://github.com/explore" data-ga-click="Header, go to explore, text:explore">
          Explore
        </a>
          <a class="dropdown-item" href="https://github.com/integrations" data-ga-click="Header, go to integrations, text:integrations">
            Integrations
          </a>
        <a class="dropdown-item" href="https://help.github.com/" data-ga-click="Header, go to help, text:help">
          Help
        </a>

        <div class="dropdown-divider"></div>

        <a class="dropdown-item" href="https://github.com/settings/profile" data-ga-click="Header, go to settings, icon:settings">
          Settings
        </a>

        <!-- '"` --><!-- </textarea></xmp> --><form accept-charset="UTF-8" action="https://github.com/logout" class="logout-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="xq5zm9uXUWJvY7HQ9AfDlNqBs0mUHgCpRNU/xEzH0+4sPA5IAZiFhd6H1P7K4nQn/4gSaMTQk7KI/6MGnJStcQ=="></div>
          <button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout">
            Sign out
          </button>
</form>      </div>
    </div>
  </li>
</ul>


    
  </div>
</div>


      


    <div id="start-of-content" class="accessibility-aid"></div>

      <div id="js-flash-container">
</div>


    <div role="main">
        <div itemscope="" itemtype="http://schema.org/SoftwareSourceCode">
    <div id="js-repo-pjax-container" data-pjax-container="">
      
<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
  <div class="container repohead-details-container">

    

<ul class="pagehead-actions">

  <li>
        <!-- '"` --><!-- </textarea></xmp> --><form accept-charset="UTF-8" action="https://github.com/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="gDDQ28gxjPOHYfRT6ZPRsmXPMsIuENXyNM/Vwy88h3syoLPQL6QKdx3MzO+XvfhSV4KRR6XpVp1kxyJKZvWSKg=="></div>      <input class="form-control" id="repository_id" name="repository_id" type="hidden" value="943149">

        <div class="select-menu js-menu-container js-select-menu">
          <a href="https://github.com/d3/d3/subscription" class="btn btn-sm btn-with-count select-menu-button js-menu-target" role="button" tabindex="0" aria-haspopup="true" data-ga-click="Repository, click Watch settings, action:wiki#show">
            <span class="js-select-button">
              <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
              Watch
            </span>
          </a>
          <a class="social-count js-social-count" href="https://github.com/d3/d3/watchers" aria-label="2939 users are watching this repository">
            2,939
          </a>

        <div class="select-menu-modal-holder">
          <div class="select-menu-modal subscription-menu-modal js-menu-content" aria-hidden="true">
            <div class="select-menu-header js-navigation-enable" tabindex="-1">
              <svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
              <span class="select-menu-title">Notifications</span>
            </div>

              <div class="select-menu-list js-navigation-container" role="menu">

                <div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
                  <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
                  <div class="select-menu-item-text">
                    <input checked="checked" id="do_included" name="do" type="radio" value="included">
                    <span class="select-menu-item-heading">Not watching</span>
                    <span class="description">Be notified when participating or @mentioned.</span>
                    <span class="js-select-button-text hidden-select-button-text">
                      <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
                      Watch
                    </span>
                  </div>
                </div>

                <div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
                  <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
                  <div class="select-menu-item-text">
                    <input id="do_subscribed" name="do" type="radio" value="subscribed">
                    <span class="select-menu-item-heading">Watching</span>
                    <span class="description">Be notified of all conversations.</span>
                    <span class="js-select-button-text hidden-select-button-text">
                      <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>
                      Unwatch
                    </span>
                  </div>
                </div>

                <div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
                  <svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"></path></svg>
                  <div class="select-menu-item-text">
                    <input id="do_ignore" name="do" type="radio" value="ignore">
                    <span class="select-menu-item-heading">Ignoring</span>
                    <span class="description">Never be notified.</span>
                    <span class="js-select-button-text hidden-select-button-text">
                      <svg aria-hidden="true" class="octicon octicon-mute" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8 2.81v10.38c0 .67-.81 1-1.28.53L3 10H1c-.55 0-1-.45-1-1V7c0-.55.45-1 1-1h2l3.72-3.72C7.19 1.81 8 2.14 8 2.81zm7.53 3.22l-1.06-1.06-1.97 1.97-1.97-1.97-1.06 1.06L11.44 8 9.47 9.97l1.06 1.06 1.97-1.97 1.97 1.97 1.06-1.06L13.56 8l1.97-1.97z"></path></svg>
                      Stop ignoring
                    </span>
                  </div>
                </div>

              </div>

            </div>
          </div>
        </div>
</form>
  </li>

  <li>
      <div class="js-toggler-container js-social-container starring-container ">
    <!-- '"` --><!-- </textarea></xmp> --><form accept-charset="UTF-8" action="https://github.com/d3/d3/unstar" class="starred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="/7Egu07pjWinGwlshhg+FLJvb/6n5h98Teue1nIhxJ5I8oMMagSyyI5MxARnjkJ8Ykxv/Jj2yJhDu3MP98HSdA=="></div>
      <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Unstar d3/d3" data-ga-click="Repository, click unstar button, action:wiki#show; text:Unstar">
        <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
        Unstar
      </button>
        <a class="social-count js-social-count" href="https://github.com/d3/d3/stargazers" aria-label="59436 users starred this repository">
          59,436
        </a>
</form>
    <!-- '"` --><!-- </textarea></xmp> --><form accept-charset="UTF-8" action="https://github.com/d3/d3/star" class="unstarred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="nLZPB3Abqad4/h+VJaFGTzaI9KiTjD5LbM5c5Ts3PlBJoAqAy/Zb6bxZtUx0pTNigP28w6tK4oCFRUsA1AainA=="></div>
      <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Star this repository" title="Star d3/d3" data-ga-click="Repository, click star button, action:wiki#show; text:Star">
        <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"></path></svg>
        Star
      </button>
        <a class="social-count js-social-count" href="https://github.com/d3/d3/stargazers" aria-label="59436 users starred this repository">
          59,436
        </a>
</form>  </div>

  </li>

  <li>
          <!-- '"` --><!-- </textarea></xmp> --><form accept-charset="UTF-8" action="https://github.com/d3/d3/fork" class="btn-with-count" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="l+iSZ56EF5gYngj+hujoPmxJZhr639sB+oYdhY4WtvJxkjzL3q317Vh58FHHr0kFUxLqSwsQwe3c3EH1jhIbNg=="></div>
            <button type="submit" class="btn btn-sm btn-with-count" data-ga-click="Repository, show fork modal, action:wiki#show; text:Fork" title="Fork your own copy of d3/d3 to your account" aria-label="Fork your own copy of d3/d3 to your account">
              <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
              Fork
            </button>
</form>
    <a href="https://github.com/d3/d3/network" class="social-count" aria-label="15846 users forked this repository">
      15,846
    </a>
  </li>
</ul>

    <h1 class="public ">
  <svg aria-hidden="true" class="octicon octicon-repo" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"></path></svg>
  <span class="author" itemprop="author"><a href="https://github.com/d3" class="url fn" rel="author">d3</a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name"><a href="https://github.com/d3/d3" data-pjax="#js-repo-pjax-container">d3</a></strong>

</h1>

  </div>
  <div class="container">
    
<nav class="reponav js-repo-nav js-sidenav-container-pjax" itemscope="" itemtype="http://schema.org/BreadcrumbList" role="navigation" data-pjax="#js-repo-pjax-container">

  <span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
    <a href="https://github.com/d3/d3" class="js-selected-navigation-item reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /d3/d3" itemprop="url">
      <svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"></path></svg>
      <span itemprop="name">Code</span>
      <meta itemprop="position" content="1">
</a>  </span>

    <span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
      <a href="https://github.com/d3/d3/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /d3/d3/issues" itemprop="url">
        <svg aria-hidden="true" class="octicon octicon-issue-opened" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
        <span itemprop="name">Issues</span>
        <span class="counter">0</span>
        <meta itemprop="position" content="2">
</a>    </span>

  <span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
    <a href="https://github.com/d3/d3/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /d3/d3/pulls" itemprop="url">
      <svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
      <span itemprop="name">Pull requests</span>
      <span class="counter">0</span>
      <meta itemprop="position" content="3">
</a>  </span>

  <a href="https://github.com/d3/d3/projects" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /d3/d3/projects">
    <svg aria-hidden="true" class="octicon octicon-project" height="16" version="1.1" viewBox="0 0 15 16" width="15"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"></path></svg>
    Projects
    <span class="counter">0</span>
</a>
    <a href="https://github.com/d3/d3/wiki" class="js-selected-navigation-item selected reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /d3/d3/wiki">
      <svg aria-hidden="true" class="octicon octicon-book" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
      Wiki
</a>

  <a href="https://github.com/d3/d3/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="pulse /d3/d3/pulse">
    <svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"></path></svg>
    Pulse
</a>
  <a href="https://github.com/d3/d3/graphs" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors /d3/d3/graphs">
    <svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"></path></svg>
    Graphs
</a>

</nav>

  </div>
</div>

<div class="container new-discussion-timeline experiment-repo-nav">
  <div class="repository-content">

    

<div id="wiki-wrapper" class="wiki-wrapper page">
<div class="gh-header">
  <div class="gh-header-show">
        <div class="gh-header-actions">
          <a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1/_edit" class="btn btn-sm ">Edit</a>
          <a href="https://github.com/d3/d3/wiki/_new" class="btn btn-sm btn-primary">New Page</a>
        </div>
    <h1 class="gh-header-title instapaper_title">过渡</h1>
      <div class="gh-header-meta">
        tianxuzhang edited this page <relative-time datetime="2016-04-06T13:10:08Z" title="2016年4月6日 GMT+8下午9:10">on 6 Apr 2016</relative-time>
        ·
        <a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1/_history" class="history">
          17 revisions
        </a>
      </div>
  </div>
</div>
<div id="wiki-content" class="wiki-content">
  <div class="has-rightbar">

  <div id="wiki-rightbar" class="wiki-rightbar">
    <div class="wiki-pages-box readability-sidebar boxed-group flush js-wiki-pages-box " role="navigation">
      
<h3 class="js-wiki-toggle-collapse wiki-auxiliary-content">
  <svg aria-hidden="true" class="octicon octicon-triangle-down caret-expanded" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M0 5l6 6 6-6z"></path></svg>
  <svg aria-hidden="true" class="octicon octicon-triangle-right caret-collapsed" height="16" version="1.1" viewBox="0 0 6 16" width="6"><path fill-rule="evenodd" d="M0 14l6-6-6-6z"></path></svg>
  Pages <span class="counter">116</span>
</h3>
<div class="boxed-group-inner wiki-auxiliary-content wiki-auxiliary-content-no-bg">
    <div class="filter-bar">
      <input type="text" id="wiki-pages-filter" class="form-control input-sm input-block js-filterable-field" placeholder="Find a Page…" aria-label="Find a Page…" tabindex="2">
    </div>

  <ul class="wiki-pages" data-filterable-for="wiki-pages-filter" data-filterable-type="substring">
    <li>
      <strong><a href="https://github.com/d3/d3/wiki" class="wiki-page-link">Home</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/3.0" class="wiki-page-link">3.0</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/3.1" class="wiki-page-link">3.1</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/API--%E4%B8%AD%E6%96%87%E6%89%8B%E5%86%8C" class="wiki-page-link">API  中文手册</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/API-Reference" class="wiki-page-link">API Reference</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/API-Reference-(%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D0%B0%D1%8F-%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F)" class="wiki-page-link">API Reference (русскоязычная версия)</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/API-%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9" class="wiki-page-link">API リファレンス</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Arrays" class="wiki-page-link">Arrays</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Behaviors" class="wiki-page-link">Behaviors</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Bundle-Layout" class="wiki-page-link">Bundle Layout</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Chord-Layout" class="wiki-page-link">Chord Layout</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Cluster-Layout" class="wiki-page-link">Cluster Layout</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/CN-Home" class="wiki-page-link">CN Home</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Colors" class="wiki-page-link">Colors</a></strong>
    </li>
    <li>
      <strong><a href="https://github.com/d3/d3/wiki/Core" class="wiki-page-link">Core</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/CSV" class="wiki-page-link">CSV</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/CSV%E6%A0%BC%E5%BC%8F%E5%8C%96" class="wiki-page-link">CSV格式化</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Drag-Behavior" class="wiki-page-link">Drag Behavior</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Force-Layout" class="wiki-page-link">Force Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Formatting" class="wiki-page-link">Formatting</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Gallery" class="wiki-page-link">Gallery</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Geo" class="wiki-page-link">Geo</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Geo-Paths" class="wiki-page-link">Geo Paths</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Geo-Projections" class="wiki-page-link">Geo Projections</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Geo-Streams" class="wiki-page-link">Geo Streams</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Geometry" class="wiki-page-link">Geometry</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Hierarchy-Layout" class="wiki-page-link">Hierarchy Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Histogram-Layout" class="wiki-page-link">Histogram Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Hull-Geom" class="wiki-page-link">Hull Geom</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/ID-Home" class="wiki-page-link">ID Home</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Internals" class="wiki-page-link">Internals</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/JP-3.0" class="wiki-page-link">JP 3.0</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/JP-API-Reference" class="wiki-page-link">JP API Reference</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/JP-Home" class="wiki-page-link">JP Home</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/JP-Tutorials" class="wiki-page-link">JP Tutorials</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Layouts" class="wiki-page-link">Layouts</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Learning-paths" class="wiki-page-link">Learning paths</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Localization" class="wiki-page-link">Localization</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Math" class="wiki-page-link">Math</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Namespaces" class="wiki-page-link">Namespaces</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Ordinal-Scales" class="wiki-page-link">Ordinal Scales</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Pack-Layout" class="wiki-page-link">Pack Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Partition-Layout" class="wiki-page-link">Partition Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Pie-Layout" class="wiki-page-link">Pie Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Plugins" class="wiki-page-link">Plugins</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Polygon-Geom" class="wiki-page-link">Polygon Geom</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Quadtree-Geom" class="wiki-page-link">Quadtree Geom</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Quantitative-Scales" class="wiki-page-link">Quantitative Scales</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Release-Notes" class="wiki-page-link">Release Notes</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Requests" class="wiki-page-link">Requests</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Scales" class="wiki-page-link">Scales</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Selection-(russians)" class="wiki-page-link">Selection (russians)</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Selections" class="wiki-page-link">Selections</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Stack-Layout" class="wiki-page-link">Stack Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG" class="wiki-page-link">SVG</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-Axes" class="wiki-page-link">SVG Axes</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-Controls" class="wiki-page-link">SVG Controls</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-Events" class="wiki-page-link">SVG Events</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-Shapes" class="wiki-page-link">SVG Shapes</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-%E5%BD%A2%E7%8A%B6" class="wiki-page-link">SVG 形状</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-%E6%8E%A7%E4%BB%B6" class="wiki-page-link">SVG 控件</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG-%E8%BD%B4" class="wiki-page-link">SVG 轴</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/SVG%E5%87%BD%E6%95%B0" class="wiki-page-link">SVG函数</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Time" class="wiki-page-link">Time</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Time-Formatting" class="wiki-page-link">Time Formatting</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Time-Intervals" class="wiki-page-link">Time Intervals</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Time-Scales" class="wiki-page-link">Time Scales</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Transitions" class="wiki-page-link">Transitions</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Tree-Layout" class="wiki-page-link">Tree Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Treemap-Layout" class="wiki-page-link">Treemap Layout</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Tutorials" class="wiki-page-link">Tutorials</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/TW-Home" class="wiki-page-link">TW Home</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Upgrading-to-3.0" class="wiki-page-link">Upgrading to 3.0</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Voronoi-Geom" class="wiki-page-link">Voronoi Geom</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/Zoom-Behavior" class="wiki-page-link">Zoom Behavior</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%D0%92%D1%8B%D0%B1%D0%BE%D1%80%D0%BA%D0%B8" class="wiki-page-link">Выборки</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%86%85%E9%83%A8" class="wiki-page-link">内部</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%87%A0%E4%BD%95" class="wiki-page-link">几何</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%88%86%E5%8C%BA%E5%B8%83%E5%B1%80" class="wiki-page-link">分区布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%8A%9B%E5%B8%83%E5%B1%80" class="wiki-page-link">力布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%8C%85%E5%B8%83%E5%B1%80" class="wiki-page-link">包布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4" class="wiki-page-link">命名空间</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%9B%9B%E5%8F%89%E6%A0%91" class="wiki-page-link">四叉树</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%9C%B0%E7%90%86" class="wiki-page-link">地理</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%9C%B0%E7%90%86%E6%8A%95%E5%BD%B1" class="wiki-page-link">地理投影</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%9C%B0%E7%90%86%E8%B7%AF%E5%BE%84" class="wiki-page-link">地理路径</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%A0%86%E5%8F%A0%E5%B8%83%E5%B1%80" class="wiki-page-link">堆叠布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%A4%9A%E8%BE%B9%E5%BD%A2" class="wiki-page-link">多边形</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%B1%82%E6%AC%A1%E5%B8%83%E5%B1%80" class="wiki-page-link">层次布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%B8%83%E5%B1%80" class="wiki-page-link">布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%BA%8F%E6%95%B0%E6%AF%94%E4%BE%8B%E5%B0%BA" class="wiki-page-link">序数比例尺</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E5%BC%A6%E5%B8%83%E5%B1%80" class="wiki-page-link">弦布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%8B%96%E5%8A%A8" class="wiki-page-link">拖动</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%8D%86%E5%B8%83%E5%B1%80" class="wiki-page-link">捆布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%8D%86%E7%BB%91%E5%B8%83%E5%B1%80" class="wiki-page-link">捆绑布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%95%B0%E5%80%BC%E6%AF%94%E4%BE%8B%E5%B0%BA" class="wiki-page-link">数值比例尺</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%95%B0%E5%AD%A6" class="wiki-page-link">数学</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%95%B0%E7%BB%84" class="wiki-page-link">数组</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%97%B6%E9%97%B4%E6%AF%94%E4%BE%8B%E5%B0%BA" class="wiki-page-link">时间比例尺</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%9C%AC%E5%9C%B0%E5%8C%96" class="wiki-page-link">本地化</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%A0%91%E5%B8%83%E5%B1%80" class="wiki-page-link">树布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%A0%B8%E5%BF%83%E5%87%BD%E6%95%B0" class="wiki-page-link">核心函数</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%A0%BC%E5%BC%8F%E5%8C%96" class="wiki-page-link">格式化</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%AF%94%E4%BE%8B%E5%B0%BA" class="wiki-page-link">比例尺</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E6%B3%B0%E6%A3%AE%E5%A4%9A%E8%BE%B9%E5%BD%A2" class="wiki-page-link">泰森多边形</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E7%9B%B4%E6%96%B9%E5%9B%BE%E5%B8%83%E5%B1%80" class="wiki-page-link">直方图布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E7%9F%A9%E5%BD%A2%E6%A0%91%E5%B8%83%E5%B1%80" class="wiki-page-link">矩形树布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E7%B0%87%E5%B8%83%E5%B1%80" class="wiki-page-link">簇布局</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E7%BC%A9%E6%94%BE" class="wiki-page-link">缩放</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E8%A1%8C%E4%B8%BA" class="wiki-page-link">行为</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E8%AF%B7%E6%B1%82" class="wiki-page-link">请求</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E8%B5%AB%E5%B0%94" class="wiki-page-link">赫尔</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="过渡 · d3_d3 Wiki_files/过渡 · d3_d3 Wiki.html" class="wiki-page-link">过渡</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E9%80%89%E6%8B%A9%E5%99%A8" class="wiki-page-link">选择器</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E9%A2%9C%E8%89%B2" class="wiki-page-link">颜色</a></strong>
    </li>
    <li class="wiki-more-pages">
      <strong><a href="https://github.com/d3/d3/wiki/%E9%A5%BC%E5%B8%83%E5%B1%80" class="wiki-page-link">饼布局</a></strong>
    </li>
    <li class="wiki-more-pages-link">
      <a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#" class="js-wiki-more-pages-link">
        Show 101 more pages…
      </a>
    </li>
  </ul>
</div>

    </div>


    <div class="clone-url">
      <h5>Clone this wiki locally</h5>
      <div class="input-group js-zeroclipboard-container">
        <input type="text" class="form-control input-sm text-small text-gray input-monospace js-url-field js-zeroclipboard-target" aria-label="Clone URL for this wiki" value="https://github.com/d3/d3.wiki.git" readonly="readonly">
        <span class="input-group-button">
          <button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"></path></svg></button>
        </span>
      </div>


        <a href="https://windows.github.com/" class="btn btn-sm sidebar-button" title="Save this wiki to your computer and use it in GitHub Desktop." aria-label="Save this wiki to your computer and use it in GitHub Desktop.">
          <svg aria-hidden="true" class="octicon octicon-desktop-download" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 6h3V0h2v6h3l-4 4-4-4zm11-4h-4v1h4v8H1V3h4V2H1c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5.34c-.25.61-.86 1.39-2.34 2h8c-1.48-.61-2.09-1.39-2.34-2H15c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1z"></path></svg>
          Clone in Desktop
        </a>
    </div>
  </div>

  <div id="wiki-body" class="wiki-body gollum-markdown-content instapaper_body">
      <div class="markdown-body">
        <blockquote>
<p><a href="https://github.com/d3/d3/wiki/Home">Wiki</a> ▸ <a class="internal present" href="https://github.com/d3/d3/wiki/API--%E4%B8%AD%E6%96%87%E6%89%8B%E5%86%8C">API--中文手册</a> ▸ <a class="internal present" href="https://github.com/d3/d3/wiki/%E6%A0%B8%E5%BF%83%E5%87%BD%E6%95%B0">核心函数</a> ▸ <strong>过渡</strong></p>
</blockquote>

<ul>
<li>本文档是D3官方文档中文翻译，并保持与<a href="https://github.com/mbostock/d3/wiki/API-Reference">最新版</a>同步。</li>
<li>如发现翻译不当或有其他问题可以通过以下方式联系译者:</li>
<li>邮箱：<a href="mailto:zhang_tianxu@sina.com">zhang_tianxu@sina.com</a>
</li>
<li>QQ群：<a href="http://jq.qq.com/?_wv=1027&amp;k=239rjew">D3.js</a>:437278817，<a href="http://jq.qq.com/?_wv=1027&amp;k=S8wGMe">大数据可视化</a>：436442115</li>
<li>Github小组：<a href="https://github.com/VisualCrew">VisualCrew</a>
</li>
</ul>

<p>过渡是一种特殊类型的选择器(<a class="internal present" href="https://github.com/d3/d3/wiki/%E9%80%89%E6%8B%A9%E5%99%A8">selection</a>)，这种操作符的应用随时间平滑而不是瞬间变换。你可以使用过渡<a class="internal present" href="https://github.com/d3/d3/wiki/%E9%80%89%E6%8B%A9%E5%99%A8#transition">transition()</a> 操作符从选择得到一个过渡。但是，过渡通常支持和选择器（例如<a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#attr">attr</a>和<a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#style">style</a>）一样的操作符，不是所有的操作符都支持。例如，你必须在过渡开始前添加元素。移除<a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#remove">remove</a>操作符用来在过渡结束后方便地移除元素。</p>

<p>过渡可能有每个元素的延迟和持续时间，使用类似于其他操作符的数据计算功能。这可以很容易地给不同元素切换过渡，不论基于数据还是索引。例如，你可以给元素排序然后在变换中交错过渡得到更好的元素重排序效果。想了解更多关于此技术的内容请参考Heer和Robertson的<a href="http://vis.berkeley.edu/papers/animated_transitions/" title="http://vis.berkeley.edu/papers/animated_transitions/">Animated Transitions in Statistical Data Graphics</a>。</p>

<p>D3有许多内置插值来简化任意值的过渡。例如，你可以从字体字符串“500 12px sans-serif”到“300 42px sans-serif”过渡，D3将发现嵌入在字符串内的数字自动地插入字体尺寸（size）和重量（weight）。您甚至可以插入任意的嵌套对象和数组或SVG路径数据。如果你找到内置插值的不足，D3允许使用<a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#attrTween">attrTween</a>和<a href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#styleTween">styleTween</a>操作符自定义的内插器。D3的插值器提供<a class="internal present" href="https://github.com/d3/d3/wiki/%E6%AF%94%E4%BE%8B%E5%B0%BA">比例尺</a>的基础并且可以用在过渡的外部。内插器是一个函数将定义域[0,1]中的而一个值t映射为一个颜色（color），数字或者任意的值。</p>

<p>更多关于过渡的内容可以参考<a href="http://bost.ocks.org/mike/transition/" title="http://bost.ocks.org/mike/transition/">Working with Transitions</a> 教程。</p>

<p>对给定的元素在给定的时间只有一个过渡被激活。然而，在相同的元素可能安排多个过渡；只要是错开的时间，每一个过渡将按顺序运行。如果有新转变给定元素上运行，它隐含取消所有旧的转变，包括任何被安排但尚未运行。这允许一个新的过渡，例如那些将对一个新的用户事件响应的过渡，将会取代老的过渡，即使那些旧的过渡已经上演过了或者延迟上演了。多级过渡（过渡是在较早一个过渡的end事件中创建的过渡）被认为是和原始的过渡相同的“年龄”的；这是内部通过在单调增加的唯一ID跟踪的，其中ID是创建多级过渡时继承的。</p>

<h2>
<a id="user-content-开始过渡" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#%E5%BC%80%E5%A7%8B%E8%BF%87%E6%B8%A1" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>开始过渡</h2>

<p><a name="user-content-d3_transition" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_transition">#</a> d3.<strong>transition</strong>([<em>selection</em>], [<em>name</em>])</p>

<p>创建动画过渡。这等价于<code>d3.select(document).transition()</code>。这个方法很少使用，因为它通常更容易从现有选择导出的转变，而不是从现有的过渡导出的选择。当使用可选的选择调用，这个方法通常返回指定选择；例如它是一个空操作。然而，transition.each的上下文中，这个方法将为指定的选择（继承了延迟，持续和其他父过渡中的属性）创建一个新的过渡。这用来实现可以不论在选择器或者在过渡中都能被调用的可重用组件是非常有用的。在后者的情况下支持导出并行过渡。相关的一个实例可以参考D3的<a href="https://github.com/mbostock/d3/wiki/SVG-Axes" title="https://github.com/mbostock/d3/wiki/SVG-Axes">axis component</a>。</p>

<p><a name="user-content-delay" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#delay">#</a> transition.<strong>delay</strong>([<em>delay</em>])</p>

<p>指定过渡<em>延迟（delay ）</em>以毫秒为单位。如果<em>延迟</em>是一个常量，则所有的元素将被赋予相同的延迟；如果<em>延迟</em>是一个函数，则这个函数将被每个选中的元素（按顺序）计算，将被传递当前的数据d和当前的索引i作为函数的变量，使用this上下文作为当前DOM元素。这个函数的返回值将被用来为每个元素的延迟设置值。默认的延迟是0。如果<em><a class="internal present" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#duration">延迟(duration)</a></em>没有被指定，就返回过渡中第一个非空元素绑定的delay值。
设定延迟为索引i的倍数是一种方便方式错开元素过渡。例如，如果你使用duration 中固定的持续，并且当前选择有n个元素，你可以通过2 * <em>duration</em> 错开过渡：</p>

<div class="highlight highlight-source-js"><pre>.<span class="pl-en">delay</span>(<span class="pl-k">function</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>) { <span class="pl-k">return</span> i <span class="pl-k">/</span> n <span class="pl-k">*</span> duration; })</pre></div>

<p>你也可以计算出延迟作为数据的一个功能，从而产生一个数据驱动的动画。</p>

<p>注意: 延迟总是相对一系列过渡中的<em>第一个</em>而言.</p>

<p><a name="user-content-duration" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#duration">#</a> transition.<strong>duration</strong>([<em>duration</em>])</p>

<p>指定每个元素的持续时间（duration ），单位为毫秒。如果持续时间是常量的，那么所有的元素被给予相同的持续时间；否则，如果持续时间是函数，则该函数为每个选定的元件（按顺序）计算持续时间，被传递的当前数据d与当前索引i，并用this表示当前的DOM元素。该函数的返回值被用于设置每个元素的持续时间。默认持续时间为250毫秒。如果没有指定时间，则返回绑定过渡（transition）中的第一个非空元素的持续时间。</p>

<p><a name="user-content-ease" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#ease">#</a> transition.<strong>ease</strong>([<em>value</em>[, <em>arguments</em>]])</p>

<p>指定过渡的缓动函数(<a href="http://www.robertpenner.com/easing/" title="http://www.robertpenner.com/easing/">easing function</a>。如果<em>value</em>参数是一个函数，它被用于缓解当前参数定时值<em>t</em>，<em>t</em>通常在范围[0,1]内。 （在过渡结束时，<em>t</em>可以是稍大于1）否则，<em>value</em>参数被假定为一个字符串，这个参数被传递给<a class="internal present" href="https://github.com/d3/d3/wiki/Transitions#d3_ease">d3.ease</a>方法来产生一个缓动函数。默认缓动函数是“cubic-in-out”。需要注意的是它不能用来定制每个元件或每个属性的缓动函数；但是，如果你使用的“线性（linear）”缓和函数，可以通过使用attrTween或styleTween插值器中内置的定制缓动功能。如果未指定缓动，则返回绑定到此过渡（transition）中的第一个非空元素的缓动函数。</p>

<h2>
<a id="user-content-过渡中的操作" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#%E8%BF%87%E6%B8%A1%E4%B8%AD%E7%9A%84%E6%93%8D%E4%BD%9C" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>过渡中的操作</h2>

<h3>
<a id="user-content-内容" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#%E5%86%85%E5%AE%B9" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>内容</h3>

<p><a name="user-content-attr" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#attr">#</a> transition.<strong>attr</strong>(<em>name</em>, <em>value</em>)</p>

<p>通过指定的<em>name</em>和<em>value</em>过渡属性的值。过渡的初始值是当前属性值（一定要事先设定一个初始值，如果你不想坏的意外），结束值是指定的值。如果value 是常量的，那么所有的元素被给予相同的属性值 ；否则，如果value 是函数，则该函数为每个选定的元件（按顺序）计算属性值，被传递的参数是当前数据d与当前索引i，用this表示当前的DOM元素。该函数的返回值被用于设置每个元素的属性。不支持null值因为插值器将变成未定义的（undefined）；如果你想在过渡结束后移除属性值可以使用remove函数。
内插器基于终值自动选择。如果终值是一个数字，开始值被强制转换为一个数字，并使用interpolateNumber内插器。如果结束值是一个字符串，执行一个检查，以查看该字符串是否代表一个颜色形如/^(#|rgb(|hsl()/或CSS命名颜色中的一个；如果是，则初始值被强制为RGB颜色，使用interpolateRgb内插器。否则，interpolateString内插器被使用，在字符串中插入数字。</p>

<p><a name="user-content-attrTween" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#attrTween">#</a> transition.<strong>attrTween</strong>(<em>name</em>, <em>tween</em>)</p>

<p>根据指定的补间（tween）函数，通过指定的名称（name）过渡属性值。过渡的开始和结束值由补间函数决定。补间函数在每个元素的过渡开始的时候被调用，传入参数有当前数据d，当前索引i，this上下文表示当前DOM元素。补间函数的返回值必须是一个插值器：函数将定义域[0,1]映射为颜色、数字或者属性值。例如，attr操作符是建立在attrTween操作符之上的。补间函数被attr操作符使用取决于终值是一个函数还是常量。如果终值是一个函数则：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">function</span> <span class="pl-en">tween</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>, <span class="pl-smi">a</span>) {
    <span class="pl-k">return</span> <span class="pl-smi">d3</span>.<span class="pl-en">interpolate</span>(a, <span class="pl-c1">String</span>(<span class="pl-smi">value</span>.<span class="pl-c1">call</span>(<span class="pl-c1">this</span>, d, i)));
}</pre></div>

<p>如果终值是一个常量则：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">function</span> <span class="pl-en">tween</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>, <span class="pl-smi">a</span>) {
    <span class="pl-k">return</span> <span class="pl-smi">d3</span>.<span class="pl-en">interpolate</span>(a, <span class="pl-c1">String</span>(value));
}</pre></div>

<p>这个attrTween操作符在你需要一个自定义的内插器的时候用到，例如：理解SVG路径数据语义。一种常见的技术是数据空间插值：其中interpolateObject用来插入两个数据值，这个插值的结果（也就是用一个shap）用来计算新属性值。使用attr操作符处理简单常见的情况，即内插器可以自动地从当前属性值转到期望的终值。</p>

<p><a name="user-content-style" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#style">#</a> transition.<strong>style</strong>(<em>name</em>, <em>value</em>[, <em>priority</em>])</p>

<p>通过指定的名称（name）和值（value）过渡CSS样式属性值。可选参数优先级（priority）也可以指定为null或者字符串"important"（不带感叹号）。过渡的起始值是当前计算的样式属性值，终值是指定的value。如果value是一个常量那么所有的元素都被指定为相同的样式属性值；否则，如果value是一个函数那么函数将为每个选定的元素（按顺序）计算值，被传递的参数有当前数据d，当前索引i，this上下文代表当前DOM元素。函数的返回值之后被用来转换每个元素的样式属性值。null是不支持的，因为插值器需要是undefined；如果你想在转换之后移除样式属性，参考end事件。
内插器基于终值自动选择。如果终值是一个数字，开始值被强制转换为一个数字，并使用interpolateNumber内插器。如果结束值是一个字符串，执行一个检查，以查看该字符串是否代表一个颜色形如/^(#|rgb(|hsl()/或CSS命名颜色中的一个；如果是，则初始值被强制为RGB颜色，使用interpolateRgb内插器。否则，interpolateString内插器被使用，在字符串中插入数字。
需要注意的是所计算的初始值也可以和以前设定的值不同，尤其是当样式属性使用的缩写属性（如“font”样式，简写为“font-size”，“font-face”，等等）。此外，计算尺寸，如“font-size”和“line-height”是以像素为单位，所以你也应该适当地指定以像素为单位的终值。</p>

<p><a name="user-content-styleTween" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#styleTween">#</a> transition.<strong>styleTween</strong>(<em>name</em>, <em>tween</em>[, <em>priority</em>])</p>

<p>根据指定的补间函数指定的名称过渡CSS样式属性的值。可选参数priority 可以被指定为null或者字符串“important”（没有感叹号）。过渡的起始和结束值由补间函数决定；补间函数在没给元素过渡开始的时候调用，被传递的参数是当前数据d，当前索引I，当前属性值a，this上下文代表当前DOM元素。补间函数的返回值必须是一个插值器：一个函数映射定义域[0,1]中的值t为一个颜色、数字或者属性值。
例如，style操作符是建立在styleTween操作符之上的。补间函数被style操作符使用取决于终值是一个函数还是常量。终值是函数时：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">function</span> <span class="pl-en">tween</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>, <span class="pl-smi">a</span>) {
    <span class="pl-k">return</span> <span class="pl-smi">d3</span>.<span class="pl-en">interpolate</span>(a, <span class="pl-c1">String</span>(<span class="pl-smi">value</span>.<span class="pl-c1">call</span>(<span class="pl-c1">this</span>, d, i)));
}</pre></div>

<p>终值是常量时：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">function</span> <span class="pl-en">tween</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>, <span class="pl-smi">a</span>) {
    <span class="pl-k">return</span> <span class="pl-smi">d3</span>.<span class="pl-en">interpolate</span>(a, <span class="pl-c1">String</span>(value));
}</pre></div>

<p>styleTween操作符在需要定制插值器的使用使用到，例如：理解CSS3转换的语义。对简单常用的情况使用style操作符，即插值器可以从当前计算的样式属性自动驱动到期望的终值。</p>

<p><a name="user-content-text" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#text">#</a> transition.<strong>text</strong>(<em>value</em>)</p>

<p>文本（text）操作符是基于textContent 属性：设置文本内容将取代任何现有的子元素。在转换开始时设置所有选定元素的文本内容为指定值。如果值是一个常数，那么所有的元素被给予相同的文本内容；否则，如果值是一个函数，则该函数被每个选定的元件（按顺序）计算，被传递当前数据d与当前索引i，this上下文作为当前的DOM元素。该函数的返回值被用于设置每个元素的文本内容。null值会清除内容。</p>

<p><a name="user-content-tween" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#tween">#</a> transition.<strong>tween</strong>(<em>name</em>, <em>factory</em>)</p>

<p>注册一个自定义补间指定的名称（name）。当在过渡开始时，指定的工厂函数将被过渡中每个选定的元素调用，传递该元素的数据（d）和索引（ⅰ）作为参数，元素作为上下文（this）。工厂应反回补间函数，在整个过渡过程中被调用。补间函数之后被反复调用，传递当前的归一化时间t在[0，1]范围内。如果工厂返回null，则补间不会在选定元素上运行。
补间函数是用来内部实现attr和style补间，并可以用来对其它文档内容进行内插。例如，内插从0到100的文本内容：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-smi">selection</span>.<span class="pl-en">transition</span>().<span class="pl-en">tween</span>(<span class="pl-s"><span class="pl-pds">"</span>text<span class="pl-pds">"</span></span>, <span class="pl-k">function</span>() {
    <span class="pl-k">var</span> i <span class="pl-k">=</span> <span class="pl-smi">d3</span>.<span class="pl-en">interpolateRound</span>(<span class="pl-c1">0</span>, <span class="pl-c1">100</span>);
    <span class="pl-k">return</span> <span class="pl-k">function</span>(<span class="pl-smi">t</span>) {
        <span class="pl-c1">this</span>.<span class="pl-smi">textContent</span> <span class="pl-k">=</span> <span class="pl-en">i</span>(t);
    };
});</pre></div>

<p>补间常使用闭包捕捉过渡开始时创建的状态。上例中，i在过渡开始的时候初始化，随后用在过渡过程中（虽然注意到，在上面的例子中，转变的开始值是硬编码为0，而过渡更常用的初始值是基于DOM中的当前状态）。
<a name="user-content-remove" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#remove">#</a> transition.<strong>remove</strong>()</p>

<p>在过渡结束时删除选定的元素。如果在任何选定的元素有新的过渡计划，这些元素不会被删除；然而，“end”事件仍会被调度。</p>

<h2>
<a id="user-content-子过渡" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#%E5%AD%90%E8%BF%87%E6%B8%A1" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>子过渡</h2>

<p>过渡可以从现有的过渡派生，类似子选择的方式。 子过渡继承缓动，持续和延迟父过渡。</p>

<p><a name="user-content-select" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#select">#</a> transition.<strong>select</strong>(<em>selector</em>)</p>

<p>当前过渡的每个元素中，选择指定的选择字符串匹配的第一个后代元素。如果当前元素没有元素匹配指定的选择器字符串，那么返回的选择中当前索引的元素将是null。操作符（除数据）自动的跳过空值，从而保持现有选择的索引。如果当前元素具有相关联的数据，该数据是由返回的部分选定继承，并自动绑定到新选定的元素。如果多个元素匹配选择器，只在文件遍历顺序的第一个匹配的元素将被选中。
这个方法大约相当于：
其中，selection 是当前过渡的隐含选择器。另外，返回的新过渡从当前的过渡继承缓动，持续和延迟。</p>

<p><a name="user-content-selectAll" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#selectAll">#</a> transition.<strong>selectAll</strong>(<em>selector</em>)</p>

<p>对当前过渡的每个元素，选择匹配指定选择字符串后代元素。返回的选择按当前选择的祖先节点进行分组。如果当前元素没有元素匹配指定选择器，返回的选择中当前索引的组将是空的。部分选取不从当前选择继承数据。然而，如果数据之前绑定到选定的元素上，那个数据可用于操作符。
这个方法大约相当于：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-smi">selection</span>.<span class="pl-en">selectAll</span>(selector).<span class="pl-en">transition</span>()</pre></div>

<p>其中，selection 是当前过渡的隐含选择器。另外，返回的新过渡从当前的过渡继承缓动，持续和延迟。当前过渡中每个子元素的持续和延迟都是继承自父元素。</p>

<p><a name="user-content-filter" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#filter">#</a> transition.<strong>filter</strong>(<em>selector</em>)</p>

<p>过滤过渡，返回一个新的过渡只包含其指定的选择是正确的元素。选择器可以被指定为一个函数或选择字符串，如“foo”。和其他操作符一样，该函数被传递当前数据d和当前索引i，this上下文作为当前的DOM元素。类似内置的数组过滤函数，返回选择不保留原选择的索引；返回移除元素的副本。如果您想保留索引，使用select代替。例如，选择所有其他元素：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">var</span> odds <span class="pl-k">=</span> <span class="pl-smi">transition</span>.<span class="pl-c1">select</span>(<span class="pl-k">function</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>) { <span class="pl-k">return</span> i <span class="pl-k">&amp;</span> <span class="pl-c1">1</span> <span class="pl-k">?</span> <span class="pl-c1">this</span> <span class="pl-k">:</span> <span class="pl-c1">null</span>; });</pre></div>

<p>等价于使用过滤函数：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">var</span> odds <span class="pl-k">=</span> <span class="pl-smi">transition</span>.<span class="pl-en">filter</span>(<span class="pl-k">function</span>(<span class="pl-smi">d</span>, <span class="pl-smi">i</span>) { <span class="pl-k">return</span> i <span class="pl-k">&amp;</span> <span class="pl-c1">1</span>; });</pre></div>

<p>或者一个过滤选择器：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">var</span> odds <span class="pl-k">=</span> <span class="pl-smi">transition</span>.<span class="pl-en">filter</span>(<span class="pl-s"><span class="pl-pds">"</span>:nth-child(odd)<span class="pl-pds">"</span></span>);</pre></div>

<p>这样你就可以使用select和过滤器在元素子集上应用补间了。</p>

<p><a name="user-content-transition" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#transition">#</a> transition.<strong>transition</strong>() </p>

<p>在同样的选中元素上创建一个新的选择，在这个过渡结束后启动。新的过渡继承当前过渡的持续和缓动。这可以用来定义链式过渡，而无需监听“end”事件。</p>

<p>// <strong>revision needed 需要重新翻译</strong></p>

<pre><code>Creates a new transition on the same selected elements that starts when this transition ends. The new transition inherits a delay equal to this transition's delay + duration to control this timing. The new transition also inherits this transition’s name, duration, and easing. This can be used to define [chained transitions](http://bl.ocks.org/mbostock/4341417) without needing to listen for "end" events.

As described above, the delay state of chained transitions is used as a scaffold for the chain.  This means that the delay method will have unexpected behaviour in this context, however, if you want to add a delay between chained transitions, an easy way to do this is to have a no-op transition in between:


selection.transition() // this transition runs from t=1s to t=3s
    .delay(1000)
    .duration(2000)
  .transition() // then a delay from t=3s to t=4s
    .duration(1000)
  .transition() // then lastly another transition from t=4s to t=5s


Though, note that the last transition in this chain inherits the 1s duration from the interstitial pause, and not the 2s duration from the first transition.
</code></pre>

<h3>
<a id="user-content-控制" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#%E6%8E%A7%E5%88%B6" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>控制</h3>

<p><a name="user-content-each" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#each">#</a> transition.<strong>each</strong>([<em>type</em>, ]<em>listener</em>)</p>

<p>如果指定了<em>类型（type）</em>，就为过渡事件增加一个侦听器(listener)，同时支持“start”, “end”和"interrupt"件。侦听器会被过渡中每个单独的元素调用。</p>

<p><em>start</em>事件在过渡的第一个异步回调（tick）中被调用，于任何补间(tween)被调用之前。对于0延迟过渡，通常在过渡之后的17ms被调用。状态函数对触发每个元素的瞬间变化是很有用的，例如改变不能被打断的属性。</p>

<p><em>end</em>事件在过渡的持续和延迟结束之后最后一个异步回调（tick）中被调用，在所有的补间都使用t=1调用之后。注意，如果对于一个给定的元素过渡被之后调度的过渡取代了， end事件就不会分配到这个元素上；中断过渡不会触发结束事件。例如，<a class="internal absent" href="https://github.com/d3/d3/wiki/%23remove#remove">transition.remove</a>调度的每个元素在过渡结束时被除去，但如果过渡被中断了，元素将不被删除。end事件可以被用作替代<a class="internal absent" href="https://github.com/d3/d3/wiki/%23transition#transition">transition.transition</a>,通过选择当前元素this，并导出新过渡来创建过渡链(<a href="http://bl.ocks.org/mbostock/1125997" title="http://bl.ocks.org/mbostock/1125997">chained transitions</a>)。</p>

<p><em>interrupt</em>事件会在同一元素上的同一种过渡打算正在运行的过渡时触发。 
<strong>translation needed: 需要翻译:</strong></p>

<pre><code>The interrupt event is dispatched on the interrupted transition immediately prior to the start event on the interrupting transition. Note that if a transition is cancelled before it starts (such as when a later-scheduled transition starts before a delayed transition), no interrupt event is dispatched.
</code></pre>

<p>如果没有指定type ，行为类似于<a class="internal present" href="https://github.com/d3/d3/wiki/Selections#each">selection.each</a>：直接为当前过渡的每个元素调用指定的函数，通过在当前的数据d和索引i，与当前的DOM元素的this上下文。 transition.each将从父过渡继承过渡参数，包括id，延迟和缓动。因此，transition.each内创建过渡不会打断父过渡，类似subtransitions。</p>

<p>transition.each方法可用于链接过渡并在一组过渡上分享定时（timing）。例如：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-smi">d3</span>.<span class="pl-en">transition</span>()
    .<span class="pl-en">duration</span>(<span class="pl-c1">750</span>)
    .<span class="pl-en">ease</span>(<span class="pl-s"><span class="pl-pds">"</span>linear<span class="pl-pds">"</span></span>)
    .<span class="pl-en">each</span>(<span class="pl-k">function</span>() {
        <span class="pl-smi">d3</span>.<span class="pl-en">selectAll</span>(<span class="pl-s"><span class="pl-pds">"</span>.foo<span class="pl-pds">"</span></span>).<span class="pl-en">transition</span>()
            .<span class="pl-c1">style</span>(<span class="pl-s"><span class="pl-pds">"</span>opacity<span class="pl-pds">"</span></span>, <span class="pl-c1">0</span>)
            .<span class="pl-c1">remove</span>();
    })
    .<span class="pl-en">transition</span>()
    .<span class="pl-en">each</span>(<span class="pl-k">function</span>() {
        <span class="pl-smi">d3</span>.<span class="pl-en">selectAll</span>(<span class="pl-s"><span class="pl-pds">"</span>.bar<span class="pl-pds">"</span></span>).<span class="pl-en">transition</span>()
            .<span class="pl-c1">style</span>(<span class="pl-s"><span class="pl-pds">"</span>opacity<span class="pl-pds">"</span></span>, <span class="pl-c1">0</span>)
            .<span class="pl-c1">remove</span>();
    });</pre></div>

<p>通过使用transition.each中的<code>d3.select(this)</code> ，你甚至可以继承一组选定元素的交错延迟。这个技术在数轴组件中用来支持自动过渡。此方法被用于<a class="internal present" href="https://github.com/d3/d3/wiki/SVG-%E8%BD%B4">SVG 轴</a>来支持自动过渡(<a href="http://bl.ocks.org/mbostock/1166403" title="http://bl.ocks.org/mbostock/1166403">automatic transitions</a>).</p>

<p><a name="user-content-call" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#call">#</a> transition.<strong>call</strong>(<em>function</em>[, <em>arguments…</em>])</p>

<p>调用指定的<em>函数（function）</em>一次，通过一些可选的<em>参数（arguments）</em>传递当前的过渡。call操作符总是返回当前的过渡，与指定函数的返回值无关。call操作符和手动执行一个函数是一样的。但是，它更容易使用方法链。例如，假设我们要在许多不同的地方以同样的方式设置一些属性。我们编写代码，把它封装为一个可重复使用的函数：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">function</span> <span class="pl-en">foo</span>(<span class="pl-smi">transition</span>) {
    transition
        .<span class="pl-en">attr</span>(<span class="pl-s"><span class="pl-pds">"</span>name1<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>value1<span class="pl-pds">"</span></span>)
        .<span class="pl-en">attr</span>(<span class="pl-s"><span class="pl-pds">"</span>name2<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>value2<span class="pl-pds">"</span></span>);
}</pre></div>

<p>现在我们可以这样使用<code>foo()</code>:</p>

<div class="highlight highlight-source-js"><pre><span class="pl-en">foo</span>(<span class="pl-smi">d3</span>.<span class="pl-en">selectAll</span>(<span class="pl-s"><span class="pl-pds">"</span>div<span class="pl-pds">"</span></span>).<span class="pl-en">transition</span>());</pre></div>

<p>或者, 等价地：</p>

<div class="highlight highlight-source-js"><pre><span class="pl-smi">d3</span>.<span class="pl-en">selectAll</span>(<span class="pl-s"><span class="pl-pds">"</span>div<span class="pl-pds">"</span></span>).<span class="pl-en">transition</span>().<span class="pl-c1">call</span>(foo);</pre></div>

<p>在很多情况下，是可以在过渡和选择上调用同一个函数foo的，因为在过渡和选择上是一样的方法。被调函数的<code>this</code>就是当前过渡。第一个用法略显多余，这我们可能在未来解决。</p>

<p><a name="user-content-empty" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#empty">#</a> transition.<strong>empty</strong>()</p>

<p>返回true如果当前过渡是空的；过渡是空的，是指它不包含任何非null元素。</p>

<p><a name="user-content-node" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#node">#</a> transition.<strong>node</strong>()</p>

<p>返回在当前过渡的第一个非空元素。如果转换为空，则返回null。</p>

<p><a name="user-content-size" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#size">#</a> transition.<strong>size</strong>()</p>

<p>返回在当前的过渡元素的总数。</p>

<h2>
<a id="user-content-easing" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#easing" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Easing</h2>

<p><a name="user-content-d3_ease" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_ease">#</a> d3.<strong>ease</strong>(<em>type</em>[, <em>arguments…</em>])</p>

<p>返回一个指定类型（type），带有任何可选参数（arguments）的内置缓动函数。一个缓动函数将当前参数化的时间值t从定义域[0,1]映射到一个相似返回的其他值；这通常用来设置过渡的缓动。D3支持以下的缓动类型：</p>

<ul>
<li>linear -标识函数, t.</li>
<li>poly(k) – t 的 k次方 (例如3).</li>
<li>quad – 等价于poly(2).</li>
<li>cubic - 等价于poly(3).</li>
<li>sin – 使用三角函数 sin.</li>
<li>exp – 2的t次方</li>
<li>circle - 四分之一圈</li>
<li>elastic(a, p) - 模拟一个橡皮筋；略有延长可能会超出0,1。</li>
<li>back(s) - 模拟备份到一个停车位。</li>
<li>bounce - 模拟一个有弹性碰撞。
这些内置的类型可以采用各种方式进行扩展：</li>
<li>in - 标识的功能。</li>
<li>out -逆转缓动的方向为[1,0]。</li>
<li>in-out -从[0,.5]和[.5,1]复制和镜像缓动函数。</li>
<li>out-in -从[1,.5]和[.5,0]复制和镜像缓动函数。
默认的缓动函数是“cubic-in-out” 它提供了适合慢入慢出动画。</li>
</ul>

<p><a name="user-content-_ease" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#_ease">#</a> <strong>ease</strong>(<em>t</em>)</p>

<p>给定的参数时间t，通常在范围[0,1]内，返回的缓动的时间。返回的值通常是在范围[0,1]为好，但对于某些缓动的函数也可以超出这个范围，比如“弹性（elastic）”就可稍微延伸。</p>

<h2>
<a id="user-content-timers" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#timers" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Timers</h2>

<p>D3在内部维护一个高效的定时器队列，使成千上万的定时器可以用最小的开销并发地处理；此外，该定时器队列保证动画的一致的定时时同时或分阶段转换被调度。如果您的浏览器支持它，定时器队列将使用requestAnimationFrame流体高效的动画。定时器队列也是聪明的使用setTimeout的时候有一个调度事件之前，出现长时间的延迟。 </p>

<p><a name="user-content-d3_timer" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_timer">#</a> d3.<strong>timer</strong>(<em>function</em>[, <em>delay</em>[, <em>time</em>]])</p>

<p>启动一个自定义动画计时器，重复地调用指定的函数（function ），直到它返回true。计时器启动后没有办法把它取消，所以一定要确保完成时，你的计时器函数返回true！
当给定函数将在一段延迟之后被调用时，一个以毫秒为单位的可选数字delay可能被指定。延时是相对于指定时间从UNIX纪元以毫秒为单位;如果没有指定时间，则默认为Date.now。
您可以使用延迟（delay ）和时间（time ）以指定function应该开始被调用的相对和绝对时刻。例如，一个日历通知可能被编码为：
d3.timer(notify, -4 * 1000 * 60 * 60, +new Date(2012, 09, 29)); // four hours before midnight October 29 (months are zero-based)</p>

<p><a name="user-content-d3_timer_flush" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_timer_flush">#</a> d3.timer.<strong>flush</strong>()</p>

<p>立即执行（调用一次）任何活动的计时器。通常，在瞬时延迟（&lt;10毫秒）之后执行零延迟过渡。如果浏览器两次呈现页面，这可能会导致一个简短的闪烁。一旦在第一事件循环的结束，然后再次紧接在第一定时器的回调。通过在第一事件循环结束时刷新定时器队列，可以立即执行任何零延迟过渡，避免了闪烁。</p>

<h2>
<a id="user-content-interpolation" class="anchor" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#interpolation" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Interpolation</h2>

<p>D3有很多内置interpolators来简化任意值的过渡；插值器是一个函数，用来将值域[0,1]中参数值t映射为一种颜色，数字或任意值。</p>

<p><a name="user-content-d3_interpolate" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolate">#</a> d3.<strong>interpolate</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个介于a和b之间的默认插值器。插值器的类型是基于后面一个值b的类型,使用以下算法:
1.如果b是颜色（color）类型，则返回interpolateRgb插值器。
2.如果b是字符串（string）类型，则返回interpolateString插值器。
3.如果b是数组（array）类型，则返回interpolateArray插值器。
4.如果b是对象（object）类型，且不能强制转换为数字类型, 则返回interpolateObject插值器。
5.否则，返回interpolateNumber插值器。
基于选定的插值器,a将被强制转换为一个适当的对应类型。颜色检查适用于 d3.rgb和其他颜色空间以及/^(#|rgb(|hsl()/形式的颜色字符串或CSS指定的颜色。
这个默认插值器的行为可以扩展至支持其他的类型。只要添加用户自定义插值器到d3.interpolators数组中即可。</p>

<p><a name="user-content-_interpolate" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#_interpolate">#</a> <strong>interpolate</strong>(<em>t</em>)</p>

<p>对在区间[0,1]中一个给定的参数t，返回相关的插入值。插值器通常用结合比例尺一起使用，映射一个输入域(如定量维度)到一个输出范围(如一系列颜色或像素位置)。</p>

<p><a name="user-content-d3_interpolateNumber" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateNumber">#</a> d3.<strong>interpolateNumber</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a，b两个数字之间的数字插值器。返回的插值器相当于:</p>

<div class="highlight highlight-source-js"><pre><span class="pl-k">function</span> <span class="pl-en">interpolate</span>(<span class="pl-smi">t</span>) {
  <span class="pl-k">return</span> a <span class="pl-k">*</span> (<span class="pl-c1">1</span> <span class="pl-k">-</span> t) <span class="pl-k">+</span> b <span class="pl-k">*</span> t;
}</pre></div>

<p>注意:当插值器用于生成一个字符串时(例如attr)，应该避免插入0或从0返回插值器。当使用字符串转化时，非常小的值可能转化为科学记数法格式从而产生一个暂时无效的属性或样式属性值。例如,数字0.0000001便转换为字符串“1 e-7”。 当插入不透明度值时，这一点尤其明显。为了避免科学记数法导致过渡的开始和结束值都是1e-6这种现象，此值是不用指数表示法转化为字符串的最小的。</p>

<p><a name="user-content-d3_interpolateRound" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateRound">#</a> d3.<strong>interpolateRound</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a和b两个数字之间的数字插值器；插值器类似于interpolateNumber,除了它会将结果值四舍五入为最近的整数。</p>

<p><a name="user-content-d3_interpolateString" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateString">#</a> d3.<strong>interpolateString</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a和b两个字符串之间的字符串插值器。字符串插值器寻找数字嵌入在a和b里,其中每个数字的形式如下:</p>

<pre><code>/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g
</code></pre>

<p>对于嵌入到b的每个数字,插值器将尝试从a中找到一个相应的数字。如果找到相应的数,便通过使用interpolateNumber创建一个数字插值器。字符串b的其余部分将作为一个模板：b字符串的静态部分对于插值器将保持值不变，插入的数字值将嵌入到模板。例如,如果a是“300 12 px sans-seri”，b是“500 36 px Comic-Sans”，两个嵌入的数字被发现。字符串剩下的静态部分是两个数字之间的空间(" "),和后缀(“px Comic-Sans”)。当传入值t =0.5时， 插值器的结果是“400 24px Comic-Sans”。</p>

<p><a name="user-content-d3_interpolateRgb" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateRgb">#</a> d3.<strong>interpolateRgb</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a和b两种颜色值之间的RGB颜色空间插值器。颜色a和b不需要在RGB里，但他们将通过d3.rgb转换为RGB值。红、绿、蓝通道是线性地插入值，在某种程度上相当于interpolateRound，即小数部分的通道值是不允许返回的。插值器的返回值是一个十六进制RGB字符串。</p>

<p><a name="user-content-d3_interpolateHsl" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateHsl">#</a> d3.<strong>interpolateHsl</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a和b两种颜色之间的HSL颜色空间插值器。颜色之间的a和b不需要在HSL范围中，但他们会通过d3.hsl被转换成HSL值。色相、饱和度和明度是线性的来插入值，在某种程度上相当于interpolateNumber。(使用开始和结束色调之间的最短路径)。插值器的返回值是一个十六进制RGB字符串。</p>

<p><a name="user-content-d3_interpolateLab" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateLab">#</a> d3.<strong>interpolateLab</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a和b两种颜色之间的Lab颜色空间插值器。颜色a和b将会通过d3.lab（如果需要的话）被转换成Lab值。然后颜色通道是线性地插入值，在某种程度上相当于interpolateNumber。插入器的返回值是一个十六进制RGB字符串。</p>

<p><a name="user-content-d3_interpolateHcl" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateHcl">#</a> d3.<strong>interpolateHcl</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个a和b颜色之间的HCL颜色空间插值器。颜色a和b将会通过d3.hcl（如果需要的话）被转换成HCL值。然后颜色通道线性地插入值，在某种程度上相当于interpolateNumber。(使用开始和结束色调之间的最短路径)。插值器的返回值是一个十六进制RGB字符串。
<a name="user-content-d3_interpolateArray" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateArray">#</a> d3.<strong>interpolateArray</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个在两个数组a和b之间的数组插值器。一个拥有与b相同长度的数组模板将被创建。对于b中的每一个元素，如果在a中存在一个相应的元素，那么对于这两个元素就会有一个通用的插值器将通过interpolate创建。如果没有这样的元素,那么来源于b的静态值将在这个模板中被使用。然后，对于给定的参数t，模板的嵌入的插值器将被求值。然后返回更新后的数组模板。例如,如果a数组为[0,1]，b数组为[1,10,100] ，然后当参数t =0.5时，插值器的结果便是数组[0.5,5.5,100]。
注意:创建一个模板数组的非保护性拷贝；返回数组的修改将对内插器的随后的评价产生不利影响。不复制是为了保证插值器的快速，因为它们是动画内部循环的一部分。</p>

<p><a name="user-content-d3_interpolateObject" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateObject">#</a> d3.<strong>interpolateObject</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个于a和b两个对象之间的插值器。一个拥有与b相同属性的对象模板将被创建。对于b中的每个属性，如果在a中存在一个对应的属性，那么通过interpolate创建这两个元素通用的插值器。如果没有这样的属性，来源于对象b的静态值将被使用在模板里。然后，对于给定的参数t，模板的嵌入的插值器将被进行求值。然后返回更新后的数组模板。例如，如果a对象是{ x:0,y:1 }和b对象是{ x:1,y:10 z:100 },那么当参数t =0.5时插值器的结果便是对象{ x:5,y:5.5,z:100 }。
对于数据空间差值，当插入数据值而不是属性值时，对象插值器尤其有用。例如，您可以插入一个对象，用来描述一个饼图里的弧，然后使用d3.svg.arc来计算这个新的SVG路径数据。
注意:创建一个模板数组的非保护性拷贝；返回数组的修改将对内插器的随后的评价产生不利影响。不复制是为了保证插值器的快速，因为它们是动画内部循环的一部分。</p>

<p><a name="user-content-d3_interpolateTransform" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateTransform">#</a> d3.<strong>interpolateTransform</strong>(<em>a</em>, <em>b</em>)</p>

<p>返回一个由两个a和b表示的二维仿射变换的插值器。每个变换分解成一个标准的转换，旋转，x偏移和比例；然后插入这些转换分量。这种行为是由CSS规范的：详看matrix decomposition for animation。</p>

<p><a name="user-content-d3_interpolateZoom" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolateZoom">#</a> d3.<strong>interpolateZoom</strong>(<em>a</em>, <em>b</em>)</p>

<p>基于Jarke J. van Wijk and Wim A.A. Nuij共同开发的“Smooth and efficient zooming and panning”（平滑有效的缩放和移动），返回一个于两个二维平面视图a和b之间的平滑插值器。每个视图的定义是由三个数字构成的数组：cx，cy和width。前两个坐标cx，cy代表视窗的中心；最后width（宽度）代表视窗的大小。返回的插入器还有一个持续时间（duration ）属性，此属性推荐用以毫秒为单位的过渡时间来编码。这个持续时间是基于x，y空间弧形轨迹路径长度的。如果你想更慢或更快的转换，那么就通过一个任意的比例因子与此相乘(<em>V</em>在原始论文中有描述)。</p>

<p><a href="https://github.com/d3/d3/wiki/Geo-Paths#interpolate">#</a> d3.geo.<strong>interpolate</strong>(<em>a</em>, <em>b</em>)</p>

<p>详见d3.geo.interpolate。</p>

<p><a name="user-content-d3_interpolators" href="https://github.com/d3/d3/wiki/%E8%BF%87%E6%B8%A1#d3_interpolators">#</a> d3.<strong>interpolators</strong></p>

<p>内置插值器工厂的数组，是d3.interpolate所使用的。额外的插值器工厂可能被添加到这个数组的末尾端。如果它支持可以插入两个指定的输入值，那么每个工厂可能会返回一个插值器；否则，工厂将返回一个假值并尝试返回其他的插值器。
例如，注册一个自定义插值器用来格式化美元和美分，你可能会写:</p>

<div class="highlight highlight-source-js"><pre><span class="pl-smi">d3</span>.<span class="pl-smi">interpolators</span>.<span class="pl-c1">push</span>(<span class="pl-k">function</span>(<span class="pl-smi">a</span>, <span class="pl-smi">b</span>) {
    <span class="pl-k">var</span> re <span class="pl-k">=</span><span class="pl-sr"> <span class="pl-pds">/</span><span class="pl-k">^</span><span class="pl-cce">\$</span>(<span class="pl-c1">[<span class="pl-c1">0-9</span>,<span class="pl-c1">.</span>]</span><span class="pl-k">+</span>)<span class="pl-k">$</span><span class="pl-pds">/</span></span>, ma, mb, f <span class="pl-k">=</span> <span class="pl-smi">d3</span>.<span class="pl-en">format</span>(<span class="pl-s"><span class="pl-pds">"</span>,.02f<span class="pl-pds">"</span></span>);
    <span class="pl-k">if</span> ((ma <span class="pl-k">=</span> <span class="pl-smi">re</span>.<span class="pl-c1">exec</span>(a)) <span class="pl-k">&amp;&amp;</span> (mb <span class="pl-k">=</span> <span class="pl-smi">re</span>.<span class="pl-c1">exec</span>(b))) {
        a <span class="pl-k">=</span> <span class="pl-c1">parseFloat</span>(ma[<span class="pl-c1">1</span>]);
        b <span class="pl-k">=</span> <span class="pl-c1">parseFloat</span>(mb[<span class="pl-c1">1</span>]) <span class="pl-k">-</span> a;
    <span class="pl-k">return</span> <span class="pl-k">function</span>(<span class="pl-smi">t</span>) {
    <span class="pl-k">return</span> <span class="pl-s"><span class="pl-pds">"</span>$<span class="pl-pds">"</span></span> <span class="pl-k">+</span> <span class="pl-en">f</span>(a <span class="pl-k">+</span> b <span class="pl-k">*</span> t);
        };
      }
});</pre></div>

<p>然后， <code>d3.interpolate("$20", "$10")(1/3)</code>，返回 $16.67；
    <code>d3.interpolate("$20", "$10")(1)</code> ，返回 $10.00；
<code>d3.interpolate("$20", "$10")(0)</code> ，返回 $20.00。   </p>

<hr>

<table>
<thead>
<tr>
<th>本文参与</th>
<th>人员</th>
<th>组织</th>
<th>时间</th>
</tr>
</thead>
<tbody>
<tr>
<td>翻译1-16页</td>
<td><a href="https://github.com/tianxuzhang">大傻</a></td>
<td><a href="https://github.com/VisualCrew">VisualCrew小组</a></td>
<td>2014-11-15 21:36:38</td>
</tr>
<tr>
<td>翻译17-26页</td>
<td>Harry</td>
<td><a href="https://github.com/VisualCrew">VisualCrew小组</a></td>
<td>2014-03-30</td>
</tr>
<tr>
<td>校对</td>
<td><a href="https://github.com/tianxuzhang">大傻</a></td>
<td><a href="https://github.com/VisualCrew">VisualCrew小组</a></td>
<td>20141115</td>
</tr>
<tr>
<td>排版/校对</td>
<td><a href="https://github.com/liang42hao">liang42hao</a></td>
<td><a href="https://github.com/VisualCrew">VisualCrew小组</a></td>
<td>2015-11-08T19:42:48Z</td>
</tr>
</tbody>
</table>

      </div>

  </div>
  </div>
</div>
</div>


  </div>
  <div class="modal-backdrop js-touch-events"></div>
</div>


    </div>
  </div>

    </div>

        <div class="container site-footer-container">
  <div class="site-footer" role="contentinfo">
    <ul class="site-footer-links float-right">
        <li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
      <li><a href="https://developer.github.com/" data-ga-click="Footer, go to api, text:api">API</a></li>
      <li><a href="https://training.github.com/" data-ga-click="Footer, go to training, text:training">Training</a></li>
      <li><a href="https://shop.github.com/" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
        <li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
        <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>

    </ul>

    <a href="https://github.com/" aria-label="Homepage" class="site-footer-mark" title="GitHub">
      <svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
    <ul class="site-footer-links">
      <li>© 2017 <span title="0.26750s from github-fe117-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
        <li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
        <li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
        <li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
        <li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
        <li><a href="https://help.github.com/" data-ga-click="Footer, go to help, text:help">Help</a></li>
    </ul>
  </div>
</div>



    

    <div id="ajax-error-message" class="ajax-error-message flash flash-error">
      <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
      <button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
        <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
      </button>
      You can't perform that action at this time.
    </div>


      
      
      
      
      
        

      
    <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
      <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"></path></svg>
      <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="过渡 · d3_d3 Wiki_files/过渡 · d3_d3 Wiki.html">Reload</a> to refresh your session.</span>
      <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="过渡 · d3_d3 Wiki_files/过渡 · d3_d3 Wiki.html">Reload</a> to refresh your session.</span>
    </div>
    <div class="facebox" id="facebox" style="display:none;">
  <div class="facebox-popup">
    <div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
    </div>
    <button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
      <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
    </button>
  </div>
</div>

  


</body></html>